package com.neulogistics.contrib.warehouse.api.application.converter;

import com.neulogistics.contrib.warehouse.api.application.query.InventoryQuery;
import com.neulogistics.contrib.warehouse.infrastructure.persistence.orm.po.InventoryPO;
import org.springframework.beans.BeanUtils;

public class InventoryQueryPOConverter {
    public static InventoryPO queryToPO(InventoryQuery inventoryQuery){
        if(inventoryQuery == null){
            return null;
        }

        InventoryPO inventoryPO = new InventoryPO();

        BeanUtils.copyProperties(inventoryQuery, inventoryPO);


        return inventoryPO;
    }
}
